<template>
    <div class="twoMenu" @click="toDeatil">{{title}}</div>
</template>

<script>
export default {
    props:["title", "id"],
    methods: {
        toDeatil(){
            this.$router.push({
                name:"detail",
                params:{
                    id: this.id
                }
            }).catch(err=>{})
        }
    },
    mounted() {
        this.toDeatil()
    }
}
</script>

<style lang="less">
.twoMenu{
    padding:4px;
    margin:4px;
    border-radius:4px;
    background: #fefefe;
    height:26px;
    line-height:26px;
    &:hover{
        background: #f6f6f6;
    }
    &:active{
        background: #efefef;
    }
}
</style>